<?php

use think\facade\Route;

Route::group('admin', function () {

    //海报列表---管理后台
    Route::group('posterAdmin', function () {
        Route::get('listPoster', 'AdminPoster/listPoster');
        Route::get('getPoster', 'AdminPoster/getPoster');
        Route::post('createPoster', 'AdminPoster/createPoster');
        Route::post('changeStatus', 'AdminPoster/changeStatus');
        Route::post('updatePoster', 'AdminPoster/updatePoster');
    });

   //海报分类---管理后台
    Route::group('posterTypeAdmin', function () {
        Route::get('listPosterType', 'AdminPosterType/listPosterType');
        Route::get('listAllPosterType', 'AdminPosterType/listAllPosterType');
        Route::get('getPosterType', 'AdminPosterType/getPosterType');
        Route::post('createPosterType', 'AdminPosterType/createPosterType');
        Route::post('changeStatus', 'AdminPosterType/changeStatus');
        Route::post('updatePosterType', 'AdminPosterType/updatePosterType');
    });

});

Route::group('app', function () {

    //海报列表---WxApp端
    Route::group('poster', function () {
        Route::get('listAllPoster', 'IndexPoster/listAllPoster'); //wxapp端 --- 全部海报
        Route::get('listMyPoster', 'IndexPoster/listMyPoster');   //wxapp端 --- 我的海报
        Route::post('createMyPoster', 'IndexPoster/createMyPoster');
        Route::post('delMyPoster', 'IndexPoster/delMyPoster');
        //获取海报码样式
        Route::get('getMarketingType', 'IndexPoster/getMarketingType');
        //设置海报码样式
        Route::post('setMarketingType', 'IndexPoster/setMarketingType');
    });

    //海报分类---WxApp端
    Route::group('posterType', function () {
        Route::get('', 'IndexPosterType/listPosterType');
    });




});





//========================================================oldapi


//海报列表---WxApp端
Route::group('poster', function () {
    Route::get('listAllPoster', 'IndexPoster/listAllPoster'); //wxapp端 --- 全部海报
    Route::get('listMyPoster', 'IndexPoster/listMyPoster');   //wxapp端 --- 我的海报
    Route::post('createMyPoster', 'IndexPoster/createMyPoster');
    Route::post('delMyPoster', 'IndexPoster/delMyPoster');
});

//海报列表---管理后台
Route::group('posterAdmin', function () {
    Route::get('listPoster', 'AdminPoster/listPoster');
    Route::get('getPoster', 'AdminPoster/getPoster');
    Route::post('createPoster', 'AdminPoster/createPoster');
    Route::post('changeStatus', 'AdminPoster/changeStatus');
    Route::post('updatePoster', 'AdminPoster/updatePoster');
});


//海报分类---WxApp端
Route::group('posterType', function () {
    Route::get('', 'IndexPosterType/listPosterType');
});

//海报分类---管理后台
Route::group('posterTypeAdmin', function () {
    Route::get('listPosterType', 'AdminPosterType/listPosterType');
    Route::get('listAllPosterType', 'AdminPosterType/listAllPosterType');
    Route::get('getPosterType', 'AdminPosterType/getPosterType');
    Route::post('createPosterType', 'AdminPosterType/createPosterType');
    Route::post('changeStatus', 'AdminPosterType/changeStatus');
    Route::post('updatePosterType', 'AdminPosterType/updatePosterType');
});